﻿<%@ Page Language="C#" MasterPageFile="Admin.master" AutoEventWireup="true" CodeBehind="Maintenance.aspx.cs" Inherits="CrossFactory.SiteNote.Admin.Maintenance" %>

	<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
	
	<div style="padding-left:25px;">
        <div id="EditFormBloc" runat="server" style="width:500px;">
        
        </div>
        
        <div id="LogsBloc" runat="server" visible="false">
            <table style="border:1px solid #6F9DD9;width:500px;" cellpadding="8">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td id="Td2">
                                    <table id="Table2" class="ms-toolbar" cellspacing="0" cellpadding="2" border="0">
                                        <tr id="Tr2">
                                            <td id="Td4">
                                                <table id="Table3" cellspacing="0" cellpadding="2" border="0">
                                                    <tr id="Tr3">
                                                        <td id="Td5" class="ms-toolbar">
                                                            Log files
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table class="logsTable" style="background-color:#EBF3FF;border-bottom:1px solid #C4C4C4;border-top:1px solid #C4C4C4;" cellpadding="0" cellspacing="0">
                            <tr>
                                <td></td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td>Delete all log files : </td>
                                <td><asp:Button ID="btnDeleteAll" runat="server" Text="Delete" OnClientClick="return ConfirmAction('Delete all log files?');" OnClick="btnDeleteAll_Click" CausesValidation="false" /></td>
                            </tr>
                            <tr>                                
                                <td>Delete log files from : </td>
                                <td>SiteNote.log.<asp:TextBox ID="txtDeleteNumber" runat="server" ValidationGroup="deleteGroup"  Width="25px" /><asp:Button ID="btnDeleteFrom" ValidationGroup="deleteGroup" runat="server" Text="Delete" OnClientClick="return ConfirmAction('Delete log files from this one ?');" OnClick="btnDeleteFrom_Click" /></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><asp:RegularExpressionValidator ID="REVNumber" ValidationGroup="deleteGroup" runat="server" ControlToValidate="txtDeleteNumber" Text="Not integer" ValidationExpression="^\d*$" Display="Dynamic"></asp:RegularExpressionValidator></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table class="logsTable" cellpadding="0" cellspacing="0">
		                    <asp:repeater id="LogsList" runat="server" OnItemDataBound="LogsList_ItemDataBound">
		                        <ItemTemplate>
				                        <tr>
					                        <td align="center">
						                        <%# ((DateTime)((System.IO.FileInfo)((DictionaryEntry)Container.DataItem).Value).LastWriteTime) %>
					                        </td>
					                        <td align="left" style="padding-left:20px;">
						                        <asp:HyperLink ID="loglink" Runat="server">
							                        <%# ((System.IO.FileInfo)((DictionaryEntry)Container.DataItem).Value).Name %>
						                        </asp:HyperLink>
					                        </td>
				                        </tr>
		                        </ItemTemplate>
	                        </asp:repeater>
	                        <tr>
                                <td id="tdPager" runat="server" style="padding-top:20px;" colspan="2" align="center"></td>
                            </tr>
	                    </table>
                    </td>
                </tr>
            </table>
	    </div>
	</div>
    </asp:Content>
              
